﻿using Microsoft.Graphics.Canvas;
using Microsoft.Graphics.Canvas.Effects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using Windows.UI;

namespace 纸片人.win2dEffectControl.DataClass
{
    public class TintEffectData : EffectOneSourceData
    {

        private bool clampOutput;
        private Color color;
        private Vector4 colorHdr=new Vector4(1,1,1,1);

    

        public Vector4 ColorHdr { get => colorHdr; set { colorHdr = value; OnPropertyChanged(); SetIsChanges(); } }
        public Color Color { get => color; set { color = value; OnPropertyChanged(); SetIsChanges(); } }
        public bool ClampOutput { get => clampOutput; set { clampOutput = value; OnPropertyChanged(); SetIsChanges(); } }
        #region 属性

        #endregion
        public override ICanvasImage GetEffect(CanvasDevice device, bool compression)
        {
            var source = GetSourceEffect(device, compression);
            if (source == null)
                return null;
          
            var effect = new TintEffect()
            {
                Source = source,
                ClampOutput = ClampOutput,
                Color = Color,
                ColorHdr = ColorHdr,

            };



            return effect;
        }


    }
}